﻿@model Inscriptionem.Models.Views.InstallViewModel

@{
    ViewBag.Title = "Inscriptionem Install";
    Layout = "Layout.cshtml";

    var message = string.Empty;

    switch (Model.Error)
    {
        case Inscriptionem.Models.Enums.InstallError.LanguageEmpty:
        {
            message = "Please enter language.";
            break;
        }
        
        case Inscriptionem.Models.Enums.InstallError.SectionEmpty:
        {
            message = "Please enter section.";
            break;
        }

        case Inscriptionem.Models.Enums.InstallError.FirstNameEmpty:
        {
            message = "Please enter first name.";
            break;
        }

        case Inscriptionem.Models.Enums.InstallError.LastNameEmpty:
        {
            message = "Please enter last name.";
            break;
        }

        case Inscriptionem.Models.Enums.InstallError.MailEmpty:
        {
            message = "Please enter mail.";
            break;
        }

        case Inscriptionem.Models.Enums.InstallError.MailNotValid:
        {
            message = "Please enter valid mail.";
            break;
        }

        case Inscriptionem.Models.Enums.InstallError.MailNotMatched:
        {
            message = "Mail addresses doesn't match.";
            break;
        }

        case Inscriptionem.Models.Enums.InstallError.PasswordEmpty:
        {
            message = "Please enter password.";
            break;
        }
        case Inscriptionem.Models.Enums.InstallError.PasswordLength:
        {
            message = "Please enter password, that 6 characters or longer.";
            break;
        }
        case Inscriptionem.Models.Enums.InstallError.PasswordNotMatched:
        {
            message = "Passwords does not match.";
            break;
        }
        case Inscriptionem.Models.Enums.InstallError.Other:
        {
            message = "Unknown error occurred, please try again.";
            break;
        }
    }
}
<div class="outer" id="contentwrap">
    <div class="postcont">
		<div id="content">	
			<div class="post type-post status-publish format-standard hentry">
				<h2 class="title" style="text-align: center;">Install</h2>
			</div>
            <div class="postdate-single install-error">@message</div>
            <div class="postdate-single">
                <form action="/Inscriptionem" method="POST">
                    <div style="float:left; width:40%; text-align: right;">
                        <p class="install-paragraph">Recreate Database</p>
                        <p class="install-paragraph">Language</p>
                        <p class="install-paragraph">Section</p>
                        <p class="install-paragraph">First Name</p>
                        <p class="install-paragraph">Nick Name</p>
                        <p class="install-paragraph">Last Name</p>
                        <p class="install-paragraph">Mail</p>
                        <p class="install-paragraph">Confirm Mail</p>
                        <p class="install-paragraph">Password</p>
                        <p class="install-paragraph">Confirm Password</p>
                        <p class="install-paragraph">Show real name to others</p>
                        <p class="install-paragraph">Show birthday to others</p>
                        <p class="install-paragraph">Show mail to others</p>
                    </div>
                    <div>
                        <p class="install-paragraph"><input type="checkbox" name="RecreateDatabase" style="margin-left: 25px;" @(Model.RecreateDatabase ? "checked" : string.Empty)/></p>
                        <p class="install-paragraph"><input type="text" name="Language" class="install-input" value="@Model.Language"/></p>
                        <p class="install-paragraph"><input type="text" name="Section" class="install-input" value="@Model.Section"/></p>
                        <p class="install-paragraph"><input type="text" name="FirstName" class="install-input" value="@Model.FirstName"/></p>
                        <p class="install-paragraph"><input type="text" name="NickName" class="install-input" value="@Model.NickName"/></p>
                        <p class="install-paragraph"><input type="text" name="LastName" class="install-input" value="@Model.LastName"/></p>
                        <p class="install-paragraph"><input type="text" name="Mail" class="install-input" value="@Model.Mail"/></p>
                        <p class="install-paragraph"><input type="text" name="MailConfirmation" class="install-input" value="@Model.MailConfirmation"/></p>
                        <p class="install-paragraph"><input type="password" name="Password" class="install-input"/></p>
                        <p class="install-paragraph"><input type="password" name="PasswordConfirmation" class="install-input"/></p>
                        <p class="install-paragraph"><input type="checkbox" name="IsRealNameVisible" style="margin-left: 25px;" @(Model.IsRealNameVisible ? "checked" : string.Empty)/></p>
                        <p class="install-paragraph"><input type="checkbox" name="IsBirthDateVisible" style="margin-left: 25px;" @(Model.IsBirthDateVisible ? "checked" : string.Empty)/></p>
                        <p class="install-paragraph"><input type="checkbox" name="IsMailVisible" style="margin-left: 25px;" @(Model.IsMailVisible ? "checked" : string.Empty)/></p>
                    </div>
                    <div class="clear"></div>
                    <div class="install-buttons"><input type="reset" value="Reset"/>&nbsp; | &nbsp;<input type="submit" value="Install"/></div>
                </form>
            </div>
		</div>
    </div>
</div>